package io;

/**
 * Holding information on a single GPS-Point
 * 
 * @author Oliver Duerr
 */
public class GPSPoint {

	private long time;
	private final double longi;
	private final double latti;
	private final double evelation;

	private double precission = -1;
	private double speed = -1;
	private double bearing = -400;
	private final int heartRate;

	/** A GPS points with speed, precission, and bearing*/
	public GPSPoint(long time, double longi, double latti, double evelation, double precission, double speed, double bearing) {
		this(time, longi, latti, evelation, -1);
		this.precission = precission;
		this.speed = speed;
		this.bearing = bearing;
	}

	public GPSPoint(long time, double longi, double latti, double evelation, int heartRate) {
		this.time = time;
		this.longi = longi;
		this.latti = latti;
		this.evelation = evelation;
		this.heartRate = heartRate;
	}

	public int getHeartRate() {
		return heartRate;
	}
	
	public double getBearing() {
		return bearing;
	}
	
	public double getSpeed() {
		return speed;
	}
	
	public long getTime() {
		return time;
	}

	public double getLongi() {
		return longi;
	}

	public double getLatti() {
		return latti;
	}

	public double getEvelation() {
		return evelation;
	}
	
	public double getPrecission() {
		return precission;
	}

	@Override
	public String toString() {
		return "time=" + time + " lat=" + latti + " long=" + longi
				+ " evelation=" + evelation + " precission " + precission;
	}

	public void setTime(long l) {
		this.time = l;
	}

}
